function out = rl(algo, path)
% instance to call the reinforcement learning framework with the model mdl
% and the algorithm algo.
%
% Revision 1
% Tobias Siegfried, 06/10/2008

% Initialize econ and natural environments
cd(path)
t = iniTime(10); % input is years
agt = iniAgents(1,t,'rb');
env = iniEnv(agt,t,'rb');
model.env = env; model.agt = agt; model.t = t;
model.sarsa.nu = 0.1;
model.sarsa.sigma = 10;
model.kernel.sigma = 0.2;
model.kernel.c = 10;
clear t agt env
% run model (function learn())
switch algo
    case 'gp'
        for a = 1 : model.agt.n % start with the upstream agent go downstream from there onwards
            [d,alphaA,cA] = gpSARSA(model,a);
        end
    case 'disc'
        
    otherwise 
        disp('unknown method')
end